import 'package:flutter/material.dart';

class MEmpty extends StatelessWidget {
  final String message;
  final IconData? icon;
  final double? height;

  const MEmpty({Key? key, required this.message, this.icon = Icons.assignment, this.height}) : super(key: key);

  // 商品为空 Icons.production_quantity_limits
  // 禁止访问 Icons.block
  // 文件 Icons.folder_open

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment.center,
      height: height,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Icon(
            icon,
            size: 80,
            color: Colors.black12,
          ),
          const SizedBox(
            height: 20,
          ),
          Text(
            message,
            style: const TextStyle(fontSize: 20, color: Colors.black45),
          )
        ],
      ),
    );
  }
}
